package com.spark.lola.rpc;

import com.spark.lola.feign.ConfFeignService;
import com.spark.lola.support.common.util.ResponseBean;
import com.spark.lola.support.wms.configuration.JPushProperties;
import com.spark.lola.support.wms.configuration.WmsProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 配置类RPC服务
 * @Author: DengYeJun
 * @Date: 2020/6/6 16:09
 */
@RestController
@RequestMapping(value = "/rpc/conf", produces = "application/json;charset=UTF-8")
public class ConfFeignServiceImpl implements ConfFeignService {
    @Autowired
    private WmsProperties wmsProperties;
    @Autowired
    private JPushProperties jPushProperties;

    /**
     * wms配置
     * @return
     */
    @Override
    @RequestMapping(value = "/wms",method = RequestMethod.POST)
    public ResponseBean wms() {
        return ResponseBean.success(wmsProperties);
    }

    /**
     * jpush配置
     * @return
     */
    @Override
    @RequestMapping(value = "/jpush",method = RequestMethod.POST)
    public ResponseBean jpush() {
        return ResponseBean.success(jPushProperties);
    }
}
